package com.p2p.controller.operationsManagement;

import com.p2p.common.base.RespResult;
import com.p2p.entity.SignStrategy;
import com.p2p.service.operationsManagementService.SignStrategyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/signStrategy")
public class SignStrategyController {

    @Autowired
    private SignStrategyService signStrategyService;

    /**
     * 签到策略页面展示
     * @return
     */
    @GetMapping(value = "/findSignStrategyList")
    @ResponseBody
    public RespResult findSignStrategyList(){

        return signStrategyService.findSignStrategyList();
    }

    /**
     * 根据id修改签到策略
     * @param signStrategy
     * @return
     */
    @PostMapping(value = "/updateSignStrategy")
    @ResponseBody
    public RespResult updateSignStrategy(@RequestBody SignStrategy signStrategy){
        return signStrategyService.updateSignStrategy(signStrategy);
    }
}
